function objToJson(list)
{
 alert('sup');
 var objects = new Array();
 for(i in list)
   {
    var rectList =  new Array();   
       
    var ID =  list[i].ID;
    var lifeline = list[i].timeline;
    var objList = list[i].objList;
	var text = list[i].text;
	var message = list[i].msgList;
	var msgName = message.text;
	alert(lifeline);
	
	for(j in objList)
      {
	   rectList.push({
                    type:      objList[j].type,
	                attrs:     objList[j].attr
				    });
      }
	objects.push({
	            lifeline:  lifeline.attr,  
				ID:        ID,
				text:      text,
				rects:     rectList
				//msgs:      el.attrs
				});
	alert(objects);		
    alert(JSON.stringify(objects));	
   }
}

function jsonToObj(json)
{

}